answer("Usage:" && thestring & return & the result)
else
put "Note: String will be stored as #128"
ask "Enter a string to store as a ‘STR ’ or ‘STR#’:"
put empty
put it into thestring
if thestring ≠ empty then
put "Hint: Leave empty to store string as a ‘STR ’"
ask "Enter the ‘STR#’ index #:"
put empty
hide msg
put it into theID
if theID = empty then
SetStr 128,thestring
else
SetStr 128,it,thestring
end if
if the result = empty then
if theID = empty then
answer("‘STR ’ #128 was changed to “" & thestring & "”")
else
answer("‘STR#’ #128, entry #" & theID & ", was changed to “"¬
& thestring & "”")
end if
else
answer("Error:" && the result)
end if
end if
end if
hide msg
end mouseUp
</script>
</part>
<part>
<id>11</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>117</left>
<top>52</top>
<right>400</right>
<bottom>115</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseUp
show cd fld About
show btn Jon
end mouseUp
</script>
</part>
<part>
<id>13</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>239</left>
<top>301</top>
<right>277</right>
<bottom>327</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseUp
go home
end mouseUp
</script>
</part>
<part>
<id>15</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>16</left>
<top>43</top>
<right>499</right>
<bottom>328</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>GetStr</name>
<script>on mouseUp
hide target
end mouseUp
</script>
</part>
<part>
<id>16</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>15</left>
<top>45</top>
<right>499</right>
<bottom>327</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>SetStr</name>
<script>on mouseUp
hide target
end mouseUp
</script>
</part>
<part>
<id>17</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>16</left>
<top>43</top>
<right>499</right>
<bottom>327</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>About</name>
<script>on mouseUp
hide target
hide btn Jon
end mouseUp
</script>
</part>
<part>
<id>18</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>15</left>
<top>44</top>
<right>499</right>
<bottom>328</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Help</name>
<script>on mouseUp
hide target
end mouseUp
</script>
</part>
<part>
<id>20</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>98</left>
<top>278</top>
<right>189</right>
<bottom>320</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>31653</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Jon</name>
<script>on mouseUp
hide target
hide cd fld About
end mouseUp
</script>
</part>
<content>
<layer>card</layer>
<id>15</id>
<text>
The GetStr XFCN returns the contents of a “STR ” resource or an entry from an “STR#” resource.
It will look for the specified string in the current stack, then in HyperCard, and then in the System File. If the specified resource cannot be found, an empty string will be returned.
Usage: Getstr(rezID [,“STR#” index param])
Getstr(1000)  -=> returns contents of “STR ” 1000 (if exists)
Getstr(-16096) -=> returns the User Name from Chooser DA
Getstr(1000, 2) -=> returns the #2 string of “STR#” 1000 (if exists)
The SetStr XCMD sets the contents of a “STR ” resource or an “STR#” resource entry in the current stack. The resource is created if it doesn’t already exist.
It places the results of its attempt to change the string into the Result. Be sure to check this global after calling SetStr. If it’s empty, then the string was changed.
Usage: SetStr(resourceID [,“STR#” index param], string)